﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="InspectManage.aspx.cs" Inherits="InspectManage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="css/style.css" rel="stylesheet" type="text/css" />

    <script src="js/date.js" type="text/javascript" language="javascript"></script>

    <script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>

    <script type="text/javascript">
        $(document).ready(function() {
            $("#Btn_Add").click(function() {
                if ($("#txtDate").val() == "") {
                    alert("巡检时间不能为空!");
                    $("#txtDate").focus();
                    return false;
                }
                var sId = "", id = "";
                $(" :checkbox[checked]").each(function() {
                    id = $(this).val();
                    sId += id + ",";
                });
                if (sId.length > 0) {
                    sId = sId.substr(0, sId.length - 1);
                    $("#hidItem").val(sId);
                }
                else {
                    alert("巡检维护项目不能为空!");
                    return false;
                }
                if ($("#txtDetail").val() == "") {
                    alert("巡检详细情况不能为空!");
                    $("#txtDetail").focus();
                    return false;
                }
                if ($("#txtSuggestion").val() == "") {
                    alert("反馈信息/使用建议不能为空!");
                    $("#txtSuggestion").focus();
                    return false;
                }
            });
        });
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table width="842" border="0" cellpadding="0" cellspacing="0" align="center">
            <tr style="color: blue; font-size: 14px;">
                <td style="height: 14px; width: 502px;">
                    <img src="images/ADD.gif" width="14px" height="14px" />巡检记录维护--&gt;大厅巡检
                </td>
            </tr>
            <tr style="color: blue; font-size: 14px;">
                <td style="height: 14px; width: 570px;" colspan="2">
                    <br />
                    巡检部门：<asp:DropDownList ID="ddlDpt" runat="server" DataSourceID="DeviceDptDataSource"
                        DataTextField="departmentName" DataValueField="departmentId" Width="120px">
                    </asp:DropDownList>
                    巡检负责人：&nbsp;&nbsp;&nbsp;&nbsp;<asp:DropDownList ID="ddlPrincipal" AutoPostBack="true"
                        runat="server" Width="120px" DataSourceID="DeviceMaintPersonSource" DataTextField="maintPersonName"
                        DataValueField="maintPersonId">
                    </asp:DropDownList>
                    巡检时间：<asp:TextBox ID="txtDate" runat="server" MaxLength="20" Width="115px" onfocus="javascript:HS_setDate(this,'btnSelect');"></asp:TextBox>
                    <asp:Button ID="btnSelect" runat="server" Style="display: none" />
                    <br />
                    <br />
                    巡检维护项目：
                    <input id="cb1" runat="server" type="checkbox" value="1" /><label>杀毒软件安装升级</label>
                    <input id="cb2" runat="server" type="checkbox" value="2" /><label>系统补丁安装</label>
                    <input id="cb3" runat="server" type="checkbox" value="3" /><label>系统杀毒</label>
                    <input id="cb4" runat="server" type="checkbox" value="4" /><label>系统调试安装</label>
                    <input id="cb5" runat="server" type="checkbox" value="5" /><label>清洁除灰</label>
                    <input id="cb6" runat="server" type="checkbox" value="6" /><label>硬件维护</label>
                    &nbsp;
                    <br />
                </td>
            </tr>
            <tr style="color: blue; font-size: 14px;">
                <td>
                    <br />
                    <span style="vertical-align: middle; height: 80px;">巡检详细情况：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
                    <asp:TextBox ID="txtDetail" runat="server" Height="80px" Width="400px" TextMode="MultiLine"></asp:TextBox>
                </td>
            </tr>
            <tr style="color: blue; font-size: 14px;">
                <td>
                    <br />
                    <span style="vertical-align: middle; height: 80px;">反馈信息/使用建议：</span>
                    <asp:TextBox ID="txtSuggestion" runat="server" Height="80px" Width="400px" TextMode="MultiLine"></asp:TextBox>
                </td>
            </tr>
            <tr style="color: blue; font-size: 14px;">
                <td colspan="2" style="height: 18px" align="center">
                    <br />
                    <asp:Button ID="Btn_Add" runat="server" Text="添加" OnClick="Btn_Add_Click" />&nbsp;
                    <input type="button" id="Button1" value="取消" onclick="location.href=location.href;" />
                </td>
            </tr>
        </table>
        <asp:SqlDataSource ID="DeviceMaintPersonSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            SelectCommand="SELECT [maintPersonId], [maintPersonName] FROM [maintPersonInfo]">
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="DeviceDptDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            SelectCommand="SELECT [departmentId], [departmentName] FROM [departmentInfo]">
        </asp:SqlDataSource>
        <input id="hidId" type="hidden" runat="server" />
        <input id="hidItem" type="hidden" runat="server" />
        <input id="hidType" type="hidden" runat="server" />
    </div>
    </form>
</body>
</html>
